<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title></title>
	[#include "/admin/include/admin_static.htm"]
    [#import "/admin/include/admin_pagination.ftl" as p/]
    <script>
        $(function() {
            $("#query").click(function() {
                $("#searchForm").attr("action","${path}/admin/borrow/borrowList.aspx?status=-1").submit();
            });

            $("#export").click(function() {
                $("#searchForm").attr("action","${path}/admin/borrow/exportBorrowList.aspx?status=-5").submit();
            });
        });
    </script>
    </head>
    <body>
        <div class="main_admin_content">

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend>已失败</legend>
            </fieldset>
            <form id="searchForm" method="post">
            <table class="search_table_div">
                <tr>
                    <td class="column">项目类型：</td>
                    <td>
                    [@u.select listKey="id"  headerKey="" headerValue="全部类型" listValue="category_name" headerButtom="false" list=LoanCategoryUtils.getLoanCategoryList()
                    name="loanCategory" value="${(loanCategory)!''}" /]
                    </td>
                    <td class="column">用户ID：</td>
                    <td><input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" class="layui-input" name="memberId" value="${memberId }" /></td>
                    <td class="column">用户名：</td>
                    <td><input type="text" name="memberName" value="${memberName }" /></td>
                </tr>
                <tr>
                    <td class="column">项目ID：</td>
                    <td><input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" class="layui-input" name="loanId" value="${loanId }" /></td>
                    <td class="column">日期：</td>
                    <td>
                        <input type="text" onclick="WdatePicker();" value="${begin_date }"
                               name="begin_date" readonly="readonly" class="layui-icon" >

                        </input>
                        <i>至</i>
                        <input type="text" onclick="WdatePicker();" value="${end_date }"
                               name="end_date" readonly="readonly" class="layui-icon" />
                    </td>
                </tr>
                <tr>
                    <th colspan="100" class="btn_td">
                        <input id="export" type="button" class="layui-btn" style="float:left;width: 100px; heigth: 30px; line-height: 30px" value="导出">
                        <input id="query" type="button" class="layui-btn" value="查询"/>
                        <input onclick="resent();" type="button" class="layui-btn" value="清空"/>
                    </th>
                </tr>
            </table>
        </form>
            <table class="layui-table">
                <colgroup>

                    <col width="80">
                    <col width="80">
                    <col width="80">
                    <col width="80">
                    <col width="80">
                    <col width="80">
                    <col width="80">
                    <col width="80">
                    <col width="80">

                </colgroup>
                <thead>
            <tr>
                	<th>项目类型</th>
                    <th>用户ID</th>
                    <th>用户名称</th>
                    <th>项目ID</th>
                    <th>借款金额</th>
                    <th>借款期限</th>
                    <th>年化收益率</th>
                    <th>申请时间</th>
                    <th>项目状态</th>
                </tr>
                </thead>
                <tbody>
				[#list loans as loan]
					<tr>
						<td>${loan.category_name }</td>
						<td>${loan.user_id}</td>
						<td>
								${loan.u_user_name}

						</td>
						<td>${loan.id }</td>

						<td>￥${loan.account}</td>
						<td>${loan.time_limit }
                           [#if loan.is_day==1 ]
								天
                           [#else]
								个月
                           [/#if]
                        </td>
						<td>${loan.apr }%</td>
						<td>
                        ${p2p_date_format(loan.addtime,"yyyy-MM-dd HH:mm:ss")}

						</td>
						<td>
						${p2p_get_dict("borrow_status",loan.status)}
						</td>
					</tr>
			[/#list]

            </table>
            </tbody>
        [@p.pager pager = page parameterMap={"loanCategory":"${loanCategory }","memberId":"${memberId }","memberName":"${memberName }","begin_date":"${begin_date }","end_date":"${end_date }"}   url = "${path}/admin/borrow/borrowList.aspx?status=-5"/]
        </div>
    </body>
</html>